//package com.letoken.platform.job.controller;
//
//import com.letoken.platform.job.jobhandler.monitor.WithdrawFailAlert;
//import com.letoken.platform.pub.res.ApiResponse;
//import com.letoken.platform.repo.web3.EvmProvider;
//import com.letoken.platform.repo.web3.provider.IEvmProvider;
//import com.letoken.platform.repo.web3.util.EvmUtil;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//import org.springframework.web.bind.annotation.RestController;
//
///**
// * @author letokenlabs
// * @date 2022/12/10$
// */
//@RestController
//@RequestMapping("/evmprovider")
//@Api(tags = "Test EvmProvider")
//public class TestEvmProviderController {
//
//    @Autowired
//    WithdrawFailAlert withdrawFailAlert;
//
//    @GetMapping("/blockHeight")
//    @ApiOperation(value = "blockHeight")
//    public ApiResponse blockHeight(@RequestParam(name = "netType", defaultValue = "bsc") String netType) {
//        IEvmProvider evm = EvmProvider.getInstance(netType);
//        return ApiResponse.create(evm.blockHeight());
//    }
//
//    @GetMapping("/gasPrice")
//    @ApiOperation(value = "gasPrice")
//    public ApiResponse gasPrice(@RequestParam(name = "netType", defaultValue = "bsc") String netType) {
//        IEvmProvider evm = EvmProvider.getInstance(netType);
//        return ApiResponse.create(evm.gasPrice());
//    }
//
//    @GetMapping("/balance")
//    @ApiOperation(value = "balance", notes = "evm")
//    public ApiResponse balance_evm(@RequestParam(name = "netType",defaultValue = "bsc") String netType,
//                                   @RequestParam(name = "address") String address) {
//        IEvmProvider evm = EvmProvider.getInstance(netType);
//        return ApiResponse.create(evm.balance(address));
//    }
//
//    @GetMapping("/tokenBalance")
//    @ApiOperation(value = "tokenBalance", notes = "tokenBalance")
//    public ApiResponse tokenBalance(@RequestParam(name = "netType", defaultValue = "bsc") String netType,
//                                    @RequestParam(name = "token") String token,
//                                   @RequestParam(name = "address") String address) {
//        IEvmProvider evm = EvmProvider.getInstance(netType);
//        return ApiResponse.create(evm.tokenBalance(token, address));
//    }
//
//    @GetMapping("/getTxReceiptstatus")
//    @ApiOperation(value = "getTxReceiptstatus", notes = "getTxReceiptstatus")
//    public ApiResponse getTxReceiptstatus(@RequestParam(name = "netType", defaultValue = "bsc") String netType,
//                                    @RequestParam(name = "txHash") String txHash) {
//        IEvmProvider evm = EvmProvider.getInstance(netType);
//        return ApiResponse.create(evm.getTxReceiptstatus(txHash));
//    }
//}